<bc:ExDATA x:Class="SLS.Presentation.DATAGTDEF" 
                xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
                xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
                xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
                xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
                xmlns:exc="clr-namespace:SLS.Controls;assembly=CLSControls" 
                xmlns:bc="clr-namespace:SLS.Base;assembly=CLSBase"
                xmlns:my="clr-namespace:SLS.Presentation"
                x:Name="Container" 
                ToolTip="{Binding DisplayName}"
                xmlns:meffed="http:\\www.codeplex.com\MEFedMVVM"            
                >
    <bc:ExDATA.Resources> 
    <!--Update on2012/10/7 11:21:15 -->
    <CollectionViewSource   x:Key="vwBaseTable" Source="{Binding Path=ViewDataSet.SetEnv.GTDEF}"/>
    <CollectionViewSource   x:Key="vwGTKR" Source="{Binding Path=ViewDataSet.SetGlobal.GTKR}"/>
    <CollectionViewSource   x:Key="vwGTPR" Source="{Binding Path=ViewDataSet.SetGlobal.GTPR}"/>
    <CollectionViewSource   x:Key="vwGTAR" Source="{Binding Path=ViewDataSet.SetGlobal.GTAR}"/>
    </bc:ExDATA.Resources>  
     <Grid Name="MasterGrid"
          VerticalAlignment="Top"
          HorizontalAlignment="Stretch"
          Width="{Binding ElementName=Container,Path=ActualWidth}">  
    <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />  
        </Grid.RowDefinitions>    
         <StackPanel>
           <WrapPanel>
                <exc:NMICD Name="NMICD"> 
                </exc:NMICD>
            </WrapPanel>            
    <exc:FilteringDataGrid 
          Name="MainGridData"
          ItemsSource="{Binding Source={StaticResource ResourceKey=vwBaseTable}}"
          AutoGenerateColumns="False"
          IsSynchronizedWithCurrentItem="True"
          SelectionChanged="MainGridData_SelectionChanged"
          SelectionMode="Extended"
          Height="Auto"
          ColumnWidth="SizeToHeader"
          SelectionUnit="FullRow">
        <DataGrid.Columns>
                    <DataGridTemplateColumn>
                        <DataGridTemplateColumn.CellTemplate>
                            <DataTemplate>
                                <exc:PopUpMenuTextBox
                                    Name="DATAPopUpMenu"
                                    Loaded="DATAPopUpMenu_Loaded"
                                     />
                            </DataTemplate>
                        </DataGridTemplateColumn.CellTemplate>
                    </DataGridTemplateColumn>        
                <DataGridTextColumn x:Name="SM"
                                    Binding="{Binding Path=SM}"
                                    Header="SM"
                                    Width="SizeToHeader" />
                <DataGridTextColumn x:Name="GTPRE"
                                    Binding="{Binding Path=GTPRE}"
                                    Header="GTPRE"
                                    Width="SizeToHeader" />
                <DataGridTextColumn x:Name="GTKEY"
                                    Binding="{Binding Path=GTKEY}"
                                    Header="GTKEY"
                                    Width="SizeToHeader" />
                <DataGridTextColumn x:Name="LDES"
                                    Binding="{Binding Path=LDES}"
                                    Header="LDES"
                                    Width="SizeToHeader" />
                <DataGridTextColumn x:Name="SDES"
                                    Binding="{Binding Path=SDES}"
                                    Header="SDES"
                                    Width="SizeToHeader" />
                <DataGridTextColumn x:Name="DIRECTKEY"
                                    Binding="{Binding Path=DIRECTKEY}"
                                    Header="DIRECTKEY"
                                    Width="SizeToHeader" />
                <DataGridTextColumn x:Name="KREAL"
                                    Binding="{Binding Path=KREAL}"
                                    Header="KREAL"
                                    Width="SizeToHeader" />
                <DataGridTextColumn x:Name="POS"
                                    Binding="{Binding Path=POS}"
                                    Header="POS"
                                    Width="SizeToHeader" />
                <DataGridTextColumn x:Name="LPOS"
                                    Binding="{Binding Path=LPOS}"
                                    Header="LPOS"
                                    Width="SizeToHeader" />
                <DataGridTextColumn x:Name="VCK1"
                                    Binding="{Binding Path=VCK1}"
                                    Header="VCK1"
                                    Width="SizeToHeader" />
                <DataGridTextColumn x:Name="EXPR1"
                                    Binding="{Binding Path=EXPR1}"
                                    Header="EXPR1"
                                    Width="SizeToHeader" />
                <DataGridTextColumn x:Name="FUSER"
                                    Binding="{Binding Path=FUSER}"
                                    Header="FUSER"
                                    Width="SizeToHeader" />
                <DataGridTextColumn x:Name="FDATE"
                                    Binding="{Binding Path=FDATE}"
                                    Header="FDATE"
                                    Width="SizeToHeader" />
                <DataGridTextColumn x:Name="LUSER"
                                    Binding="{Binding Path=LUSER}"
                                    Header="LUSER"
                                    Width="SizeToHeader" />
                <DataGridTextColumn x:Name="LDATE"
                                    Binding="{Binding Path=LDATE}"
                                    Header="LDATE"
                                    Width="SizeToHeader" />
                <DataGridTextColumn x:Name="UID"
                                    Binding="{Binding Path=UID}"
                                    Header="UID"
                                    Width="SizeToHeader" />
            </DataGrid.Columns>
          </exc:FilteringDataGrid>  
             </StackPanel>
            <GridSplitter Grid.Row="1"></GridSplitter>            
              <ScrollViewer 
                Grid.Row="2" >
                   <WrapPanel  >                          
                        <Grid>
                        <Grid HorizontalAlignment="Left" Margin="0,0,0,0"  VerticalAlignment="Top">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto" />
                                <ColumnDefinition Width="Auto" />
                            </Grid.ColumnDefinitions>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto" />
                            </Grid.RowDefinitions>
                            <Label Content="SM:" Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left" Margin="3" 
                            VerticalAlignment="Center" />
                                    <TextBox Grid.Column="1"
                                    Grid.Row="0"
                                    Height="23"
                                    HorizontalAlignment="Left"
                                    Margin="3"
                                    Name="SMTextBox"
                                    Text="{Binding Path=SM,Source={StaticResource ResourceKey=vwBaseTable},   Mode=TwoWay, ValidatesOnExceptions=true, NotifyOnValidationError=true}"
                                    VerticalAlignment="Center"
                                    Width="120" />
                        </Grid>
                    </Grid> 
                        <Grid>
                        <Grid HorizontalAlignment="Left" Margin="0,0,0,0"  VerticalAlignment="Top">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto" />
                                <ColumnDefinition Width="Auto" />
                            </Grid.ColumnDefinitions>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto" />
                            </Grid.RowDefinitions>
                            <Label Content="GTPRE:" Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left" Margin="3" 
                            VerticalAlignment="Center" />
                                    <TextBox Grid.Column="1"
                                    Grid.Row="0"
                                    Height="23"
                                    HorizontalAlignment="Left"
                                    Margin="3"
                                    Name="GTPRETextBox"
                                    Text="{Binding Path=GTPRE,Source={StaticResource ResourceKey=vwBaseTable},   Mode=TwoWay, ValidatesOnExceptions=true, NotifyOnValidationError=true}"
                                    VerticalAlignment="Center"
                                    Width="120" />
                        </Grid>
                    </Grid> 
                        <Grid>
                        <Grid HorizontalAlignment="Left" Margin="0,0,0,0"  VerticalAlignment="Top">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto" />
                                <ColumnDefinition Width="Auto" />
                            </Grid.ColumnDefinitions>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto" />
                            </Grid.RowDefinitions>
                            <Label Content="GTKEY:" Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left" Margin="3" 
                            VerticalAlignment="Center" />
                                    <TextBox Grid.Column="1"
                                    Grid.Row="0"
                                    Height="23"
                                    HorizontalAlignment="Left"
                                    Margin="3"
                                    Name="GTKEYTextBox"
                                    Text="{Binding Path=GTKEY,Source={StaticResource ResourceKey=vwBaseTable},   Mode=TwoWay, ValidatesOnExceptions=true, NotifyOnValidationError=true}"
                                    VerticalAlignment="Center"
                                    Width="120" />
                        </Grid>
                    </Grid> 
                        <Grid>
                        <Grid HorizontalAlignment="Left" Margin="0,0,0,0"  VerticalAlignment="Top">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto" />
                                <ColumnDefinition Width="Auto" />
                            </Grid.ColumnDefinitions>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto" />
                            </Grid.RowDefinitions>
                            <Label Content="LDES:" Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left" Margin="3" 
                            VerticalAlignment="Center" />
                                    <TextBox Grid.Column="1"
                                    Grid.Row="0"
                                    Height="23"
                                    HorizontalAlignment="Left"
                                    Margin="3"
                                    Name="LDESTextBox"
                                    Text="{Binding Path=LDES,Source={StaticResource ResourceKey=vwBaseTable},   Mode=TwoWay, ValidatesOnExceptions=true, NotifyOnValidationError=true}"
                                    VerticalAlignment="Center"
                                    Width="120" />
                        </Grid>
                    </Grid> 
                        <Grid>
                        <Grid HorizontalAlignment="Left" Margin="0,0,0,0"  VerticalAlignment="Top">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto" />
                                <ColumnDefinition Width="Auto" />
                            </Grid.ColumnDefinitions>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto" />
                            </Grid.RowDefinitions>
                            <Label Content="SDES:" Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left" Margin="3" 
                            VerticalAlignment="Center" />
                                    <TextBox Grid.Column="1"
                                    Grid.Row="0"
                                    Height="23"
                                    HorizontalAlignment="Left"
                                    Margin="3"
                                    Name="SDESTextBox"
                                    Text="{Binding Path=SDES,Source={StaticResource ResourceKey=vwBaseTable},   Mode=TwoWay, ValidatesOnExceptions=true, NotifyOnValidationError=true}"
                                    VerticalAlignment="Center"
                                    Width="120" />
                        </Grid>
                    </Grid> 
                        <Grid>
                        <Grid HorizontalAlignment="Left" Margin="0,0,0,0"  VerticalAlignment="Top">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto" />
                                <ColumnDefinition Width="Auto" />
                            </Grid.ColumnDefinitions>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto" />
                            </Grid.RowDefinitions>
                            <Label Content="DIRECTKEY:" Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left" Margin="3" 
                            VerticalAlignment="Center" />
                                    <TextBox Grid.Column="1"
                                    Grid.Row="0"
                                    Height="23"
                                    HorizontalAlignment="Left"
                                    Margin="3"
                                    Name="DIRECTKEYTextBox"
                                    Text="{Binding Path=DIRECTKEY,Source={StaticResource ResourceKey=vwBaseTable},   Mode=TwoWay, ValidatesOnExceptions=true, NotifyOnValidationError=true}"
                                    VerticalAlignment="Center"
                                    Width="120" />
                        </Grid>
                    </Grid> 
                        <Grid>
                        <Grid HorizontalAlignment="Left" Margin="0,0,0,0"  VerticalAlignment="Top">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto" />
                                <ColumnDefinition Width="Auto" />
                            </Grid.ColumnDefinitions>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto" />
                            </Grid.RowDefinitions>
                            <Label Content="KREAL:" Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left" Margin="3" 
                            VerticalAlignment="Center" />
                                    <TextBox Grid.Column="1"
                                    Grid.Row="0"
                                    Height="23"
                                    HorizontalAlignment="Left"
                                    Margin="3"
                                    Name="KREALTextBox"
                                    Text="{Binding Path=KREAL,Source={StaticResource ResourceKey=vwBaseTable},   Mode=TwoWay, ValidatesOnExceptions=true, NotifyOnValidationError=true}"
                                    VerticalAlignment="Center"
                                    Width="120" />
                        </Grid>
                    </Grid> 
                        <Grid>
                        <Grid HorizontalAlignment="Left" Margin="0,0,0,0"  VerticalAlignment="Top">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto" />
                                <ColumnDefinition Width="Auto" />
                            </Grid.ColumnDefinitions>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto" />
                            </Grid.RowDefinitions>
                            <Label Content="POS:" Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left" Margin="3" 
                            VerticalAlignment="Center" />
                                    <TextBox Grid.Column="1"
                                    Grid.Row="0"
                                    Height="23"
                                    HorizontalAlignment="Left"
                                    Margin="3"
                                    Name="POSTextBox"
                                    Text="{Binding Path=POS,Source={StaticResource ResourceKey=vwBaseTable},   Mode=TwoWay, ValidatesOnExceptions=true, NotifyOnValidationError=true}"
                                    VerticalAlignment="Center"
                                    Width="120" />
                        </Grid>
                    </Grid> 
                        <Grid>
                        <Grid HorizontalAlignment="Left" Margin="0,0,0,0"  VerticalAlignment="Top">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto" />
                                <ColumnDefinition Width="Auto" />
                            </Grid.ColumnDefinitions>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto" />
                            </Grid.RowDefinitions>
                            <Label Content="LPOS:" Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left" Margin="3" 
                            VerticalAlignment="Center" />
                                    <TextBox Grid.Column="1"
                                    Grid.Row="0"
                                    Height="23"
                                    HorizontalAlignment="Left"
                                    Margin="3"
                                    Name="LPOSTextBox"
                                    Text="{Binding Path=LPOS,Source={StaticResource ResourceKey=vwBaseTable},   Mode=TwoWay, ValidatesOnExceptions=true, NotifyOnValidationError=true}"
                                    VerticalAlignment="Center"
                                    Width="120" />
                        </Grid>
                    </Grid> 
                        <Grid>
                        <Grid HorizontalAlignment="Left" Margin="0,0,0,0"  VerticalAlignment="Top">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto" />
                                <ColumnDefinition Width="Auto" />
                            </Grid.ColumnDefinitions>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto" />
                            </Grid.RowDefinitions>
                            <Label Content="VCK1:" Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left" Margin="3" 
                            VerticalAlignment="Center" />
                                    <TextBox Grid.Column="1"
                                    Grid.Row="0"
                                    Height="23"
                                    HorizontalAlignment="Left"
                                    Margin="3"
                                    Name="VCK1TextBox"
                                    Text="{Binding Path=VCK1,Source={StaticResource ResourceKey=vwBaseTable},   Mode=TwoWay, ValidatesOnExceptions=true, NotifyOnValidationError=true}"
                                    VerticalAlignment="Center"
                                    Width="120" />
                        </Grid>
                    </Grid> 
                        <Grid>
                        <Grid HorizontalAlignment="Left" Margin="0,0,0,0"  VerticalAlignment="Top">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto" />
                                <ColumnDefinition Width="Auto" />
                            </Grid.ColumnDefinitions>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto" />
                            </Grid.RowDefinitions>
                            <Label Content="EXPR1:" Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left" Margin="3" 
                            VerticalAlignment="Center" />
                                    <TextBox Grid.Column="1"
                                    Grid.Row="0"
                                    Height="23"
                                    HorizontalAlignment="Left"
                                    Margin="3"
                                    Name="EXPR1TextBox"
                                    Text="{Binding Path=EXPR1,Source={StaticResource ResourceKey=vwBaseTable},   Mode=TwoWay, ValidatesOnExceptions=true, NotifyOnValidationError=true}"
                                    VerticalAlignment="Center"
                                    Width="120" />
                        </Grid>
                    </Grid> 
                        <Grid>
                        <Grid HorizontalAlignment="Left" Margin="0,0,0,0"  VerticalAlignment="Top">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto" />
                                <ColumnDefinition Width="Auto" />
                            </Grid.ColumnDefinitions>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto" />
                            </Grid.RowDefinitions>
                            <Label Content="FUSER:" Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left" Margin="3" 
                            VerticalAlignment="Center" />
                                    <TextBox Grid.Column="1"
                                    Grid.Row="0"
                                    Height="23"
                                    HorizontalAlignment="Left"
                                    Margin="3"
                                    Name="FUSERTextBox"
                                    Text="{Binding Path=FUSER,Source={StaticResource ResourceKey=vwBaseTable},   Mode=TwoWay, ValidatesOnExceptions=true, NotifyOnValidationError=true}"
                                    VerticalAlignment="Center"
                                    Width="120" />
                        </Grid>
                    </Grid> 
                        <Grid>
                        <Grid HorizontalAlignment="Left" Margin="0,0,0,0"  VerticalAlignment="Top">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto" />
                                <ColumnDefinition Width="Auto" />
                            </Grid.ColumnDefinitions>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto" />
                            </Grid.RowDefinitions>
                            <Label Content="FDATE:" Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left" Margin="3" 
                            VerticalAlignment="Center" />
                            <DatePicker Grid.Column="1" Grid.Row="0" Height="25" 
                            HorizontalAlignment="Left" Margin="3" 
                            SelectedDate="{Binding Path=FDATE, 
                            Mode=TwoWay, ValidatesOnExceptions=true, NotifyOnValidationError=true}" 
                            VerticalAlignment="Center" Width="115" />
                            
                        </Grid>
                    </Grid> 
                        <Grid>
                        <Grid HorizontalAlignment="Left" Margin="0,0,0,0"  VerticalAlignment="Top">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto" />
                                <ColumnDefinition Width="Auto" />
                            </Grid.ColumnDefinitions>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto" />
                            </Grid.RowDefinitions>
                            <Label Content="LUSER:" Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left" Margin="3" 
                            VerticalAlignment="Center" />
                                    <TextBox Grid.Column="1"
                                    Grid.Row="0"
                                    Height="23"
                                    HorizontalAlignment="Left"
                                    Margin="3"
                                    Name="LUSERTextBox"
                                    Text="{Binding Path=LUSER,Source={StaticResource ResourceKey=vwBaseTable},   Mode=TwoWay, ValidatesOnExceptions=true, NotifyOnValidationError=true}"
                                    VerticalAlignment="Center"
                                    Width="120" />
                        </Grid>
                    </Grid> 
                        <Grid>
                        <Grid HorizontalAlignment="Left" Margin="0,0,0,0"  VerticalAlignment="Top">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto" />
                                <ColumnDefinition Width="Auto" />
                            </Grid.ColumnDefinitions>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto" />
                            </Grid.RowDefinitions>
                            <Label Content="LDATE:" Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left" Margin="3" 
                            VerticalAlignment="Center" />
                            <DatePicker Grid.Column="1" Grid.Row="0" Height="25" 
                            HorizontalAlignment="Left" Margin="3" 
                            SelectedDate="{Binding Path=LDATE, 
                            Mode=TwoWay, ValidatesOnExceptions=true, NotifyOnValidationError=true}" 
                            VerticalAlignment="Center" Width="115" />
                            
                        </Grid>
                    </Grid> 
                        <Grid>
                        <Grid HorizontalAlignment="Left" Margin="0,0,0,0"  VerticalAlignment="Top">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto" />
                                <ColumnDefinition Width="Auto" />
                            </Grid.ColumnDefinitions>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto" />
                            </Grid.RowDefinitions>
                            <Label Content="UID:" Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left" Margin="3" 
                            VerticalAlignment="Center" />
                                    <TextBox Grid.Column="1"
                                    Grid.Row="0"
                                    Height="23"
                                    HorizontalAlignment="Left"
                                    Margin="3"
                                    Name="UIDTextBox"
                                    Text="{Binding Path=UID,Source={StaticResource ResourceKey=vwBaseTable},   Mode=TwoWay, ValidatesOnExceptions=true, NotifyOnValidationError=true}"
                                    VerticalAlignment="Center"
                                    Width="120" />
                        </Grid>
                    </Grid> 
                    </WrapPanel>
          </ScrollViewer>  
    </Grid>
</bc:ExDATA>
